Draft
Conversation
…with 3 updates (#7560) Bumps the gh-actions-packages group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [DataDog/junit-upload-github-action](https://github.com/datadog/junit-upload-github-action) and [actions/stale](https://github.com/actions/stale). Bumps the gh-actions-packages group with 3 updates in the /.github/workflows directory: [actions/checkout](https://github.com/actions/checkout), [DataDog/junit-upload-github-action](https://github.com/datadog/junit-upload-github-action) and [actions/stale](https://github.com/actions/stale). Updates `actions/checkout` from 6.0.1 to 6.0.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v6.0.1...de0fac2) Updates `DataDog/junit-upload-github-action` from 2.0.0 to 2.1.1 - [Release notes](https://github.com/datadog/junit-upload-github-action/releases) - [Commits](DataDog/junit-upload-github-action@v2...055560f) Updates `actions/stale` from 10.1.1 to 10.2.0 - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](actions/stale@9971854...b5d41d4) Updates `actions/checkout` from 6.0.1 to 6.0.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v6.0.1...de0fac2) Updates `DataDog/junit-upload-github-action` from 2.0.0 to 2.1.1 - [Release notes](https://github.com/datadog/junit-upload-github-action/releases) - [Commits](DataDog/junit-upload-github-action@v2...055560f) Updates `actions/stale` from 10.1.1 to 10.2.0 - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](actions/stale@9971854...b5d41d4) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: gh-actions-packages - dependency-name: DataDog/junit-upload-github-action dependency-version: 2.1.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: gh-actions-packages - dependency-name: actions/stale dependency-version: 10.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: gh-actions-packages - dependency-name: actions/checkout dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: gh-actions-packages - dependency-name: DataDog/junit-upload-github-action dependency-version: 2.1.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: gh-actions-packages - dependency-name: actions/stale dependency-version: 10.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: gh-actions-packages ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Add `repository.datadog.yaml` configuration to enable the Datadog merge queue with speculative workflow. This allows PRs to be validated against the latest base branch before merging, preventing conflicts and broken builds in high-velocity merges. The queue is restricted to `master` to avoid running on other branches. Configuration details: - Speculative workflow with fallback enabled - Up to 5 PRs validated in parallel - GitLab checks enabled with retry support - Fail-fast disabled to wait for full pipeline completion - Labels skipped to avoid triggering required status checks
chore(cursor): add worktrees.json for worktree setup Run `yarn install` when Cursor creates a worktree so parallel agent worktrees have dependencies installed. Merge branch 'master' into watson/cursor-worktrees Co-authored-by: thomas.watson <thomas.watson@datadoghq.com>
chore: add add-new-instrumentation agent skill Adds a shared skill guide for creating new dd-trace instrumentations and plugins. The skill lives under `.agents/skills/` and is symlinked into both `.claude/skills/` and `.cursor/skills/` so it's available to all AI agents. Updates `.gitignore` to track the skill files while continuing to exclude other Claude/Cursor settings. Address review comments Co-authored-by: thomas.watson <thomas.watson@datadoghq.com>
test: enable --allow-uncaught in mocha runs Add --allow-uncaught to mocha-based test scripts in package.json so uncaught errors are treated as fatal instead of being absorbed by mocha. Update the direct mocha invocation in platform.yml to match script behavior for CI jobs that do not go through npm/yarn test scripts. refactor(test): centralize mocha allow-uncaught flag Configure allowUncaught in .mocharc.js and remove duplicated --allow-uncaught flags from test scripts and workflow invocation. This keeps mocha behavior consistent while reducing script noise. Co-authored-by: Cursor <cursoragent@cursor.com> Merge branch 'master' into watson/mocha-abort-on-uncaught Co-authored-by: thomas.watson <thomas.watson@datadoghq.com>
chore: clean up redundant co-owner entries in CODEOWNERS @DataDog/dd-trace-js already has a catch-all rule at the top of the file, so explicit co-ownership on individual paths is redundant. Remove the duplicate entries. Merge branch 'master' into watson/cleanup-codeowners Co-authored-by: thomas.watson <thomas.watson@datadoghq.com>
docs(cursor): clarify pr-body command instructions - Reframe template rules and fix "references" typo. - Add rule: blank line after each markdown headline. - Call out removing template comments and optional "Additional Notes". Co-authored-by: thomas.watson <thomas.watson@datadoghq.com>
#7212) Add propagation hash support to Data Streams Monitoring (DSM) and Database Monitoring (DBM) to enable correlation between traces, database operations, and data stream pathways using process and container metadata. The propagation hash is an FNV-1a 64-bit hash combining process tags (entrypoint info, package.json name) with container tags received from the Datadog agent. This hash is included in DSM pathway computations and DBM SQL comments to enable enhanced observability and trace correlation. Key changes: - Create propagation-hash module for FNV-1a hash computation with caching - Update DSM pathway hash computation to include propagation hash - Add ProcessTags field to DSM payloads sent to agent - Add ddsh parameter to DBM SQL comments containing propagation hash - Capture container tags from agent response headers - Feature is opt-in via DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED This aligns with similar implementations in dd-trace-py (#15356), dd-trace-java (#9282), and dd-trace-rb (#5208, #5209). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Closed
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## v5.x #7586 +/- ##
==========================================
- Coverage 83.19% 80.22% -2.97%
==========================================
Files 476 733 +257
Lines 20153 31565 +11412
==========================================
+ Hits 16766 25323 +8557
- Misses 3387 6242 +2855 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Overall package sizeSelf size: 4.78 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 2.0.6 | 81.92 kB | 816.75 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
* When the telemetry was separated in more messages than expected, we were unsubscribing before the latests messages * As we were waiting to the test request to be finished to subscribe to the telemetry, sometimes, some telemetry was arriving before our subscription, and we were losing telemetry.
Run CI workflows on `mq-working-branch-master-*` push events in addition to `master` so GitHub Actions also execute in the Datadog merge queue.
b09ab76 to
462d1eb
Compare
Simplifies and aligns the editor configuration so formatting rules are consistent and editor-agnostic where possible. - Moved spell-check dictionary from .vscode/settings.json to a standalone .cspell.json so it works across all editors, not just VSCode. - Added .vscode/extensions.json recommending the EditorConfig and Code Spell Checker extensions to new contributors. - Simplified .vscode/settings.json by removing contentious per-language formatter overrides and ESLint-as-default-formatter config. - Removed the markdown exception in .editorconfig that disabled trim_trailing_whitespace for *.md files, making the rules uniform across all file types. Motivation - Align VSCode editor config with .editorconfig file (VSCode users don't automatically load this file without a custom plugin) - Remove contentious entries from VSCode config
The types incorrectly showed 100; the actual default is 15. Also expand redaction config docs with built-in defaults, source link, and redactionExcludedIdentifiers cross-reference.
462d1eb to
73309f2
Compare
* add APM integration skill, which covers instrumentation, plugins, a new integration guide, and reference integrations.
* Update libdatadog-nodejs to 0.8.1 * Update config * Remove tests that start the CT more than once (not supported anymore) * On advice from crashtracking team, completing this TODO. * CT tests: stub instead of spy * Restore removed tests --------- Co-authored-by: Gyuheon Oh <gyuheon.oh@datadoghq.com> Co-authored-by: Gyuheon Oh <102937919+gyuheon0h@users.noreply.github.com>
* fix(kafkajs): sync DSM context to currentStore to prevent context leaking When processing concurrent Kafka messages, the DSM context was being set via enterWith() on AsyncLocalStorage but not synced to ctx.currentStore. Since ctx.currentStore is what gets returned from bindStart and bound to async continuations via runStores, this caused DSM context to leak between concurrent message handlers. The fix syncs the DSM context to ctx.currentStore after DSM operations complete, ensuring each handler's async continuations maintain the correct DSM context. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * test(dsm): add regression test for context propagation race condition Add tests that verify DSM context is properly scoped to each handler's async continuations when using diagnostic channels with runStores. The tests verify that: 1. ctx.currentStore has dataStreamsContext after setDataStreamsContext 2. Concurrent handlers maintain isolated DSM contexts 3. DSM context persists through multiple async boundaries Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(dsm): sync DSM context to currentStore to prevent context leaking Add syncToStore helper in DSM context module that syncs DSM context from AsyncLocalStorage to ctx.currentStore after DSM operations. This fixes a race condition where DSM context was being set via enterWith() but not synced to ctx.currentStore, which is what gets bound to async continuations via store.run(). Without syncing, DSM context would leak between concurrent message handlers. Updated plugins: - kafkajs (consumer, producer) - amqplib (consumer, producer) - bullmq (consumer, producer) - rhea (consumer) - google-cloud-pubsub (consumer, producer) - aws-sdk (sqs, kinesis) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * remove comment * chore: remove contrived regression test The unit test was useful for validating the fix during development but is contrived and doesn't add value as a permanent test. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * test(dsm): add unit tests for syncToStore and integration spy tests Add comprehensive tests for the new syncToStore helper: - Unit tests for syncToStore in context.spec.js covering normal operation, edge cases, and integration with setDataStreamsContext - Spy tests in 6 integration test files to verify syncToStore is called after produce and consume operations Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(dsm): call syncToStore via module object for testability Change all plugins to call DataStreamsContext.syncToStore(ctx) instead of destructuring syncToStore at import time. This allows sinon spies to intercept calls during testing. When functions are destructured at require-time, they bind to the original function reference. Spies set up later on the module object don't affect these bindings. Calling via the module object ensures spies work correctly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(dsm): remove invalid producer-side syncToStore tests for AWS SDK The syncToStore fix only applies to the consumer path where bindStart is used. AWS SDK plugins (SQS, Kinesis) use requestInject for producers, which doesn't need context synchronization since: 1. requestInject is called before the request is sent 2. DSM context is encoded directly into the message 3. There's no async continuation where context leaking would occur Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: remove unnecessary comments from test files Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(dsm): move DSM logic from bindStart to start for correct context binding By moving DSM checkpoint/encoding logic into start() (which runs after the child context is bound), the DSM context naturally lands in the correct async store — eliminating the need for the syncToStore workaround in kafkajs, amqplib, bullmq, and rhea consumer plugins. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(dsm): remove syncToStore functionality The actual fix for the context propagation race condition is moving DSM logic from bindStart to start. The syncToStore workaround is unnecessary. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(dsm): move DSM logic from bindStart to start for google-cloud-pubsub Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: remove extra blank lines in google-cloud-pubsub Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: fix comma placement in amqplib producer setCheckpoint call Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test(kafkajs): add regression test for DSM context leak between concurrent consumers When two KafkaJS consumers process messages concurrently and each produces to a different topic, the DSM (Data Streams Monitoring) context leaks between them. The first consumer to process loses its DSM context entirely (null parent), while the second consumer picks up the first's context instead of its own. This test forces the interleaving by using promise gates to ensure both eachMessage handlers have fired before either produces, reliably reproducing the bug. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test(kafkajs): remove redundant comments Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test(dsm): add regression tests for DSM context leak in amqplib, bullmq, rhea, google-cloud-pubsub Same root cause as the kafkajs test: ctx.currentStore is set by startSpan before decodeDataStreamsContext/setCheckpoint call enterWith, so the DSM context is never included in the bound store for async continuations. Verified deterministic: 10/10 failures across all plugins and versions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test(dsm): fix lint and remove redundant comments Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test(rhea): use const for senderAOut Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test(rhea): remove rhea DSM regression test Rhea's producer DSM checkpoint happens in a separate encode hook, not in bindStart/start, so the current fix doesn't cover it. Will be addressed in a separate PR. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(rhea): remove rhea consumer changes, tracked separately in #7581 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test(dsm): move google-cloud-pubsub changes to separate PR Moved DSM context fix and regression test for google-cloud-pubsub to #7582 to fix independently. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
73309f2 to
f42eb7d
Compare
This comment has been minimized.
This comment has been minimized.
* fix hooks double patching * Prevent fix on builtin modules * testing with out weakmap * fix hook cache logic * fix onrequire wrapping
f42eb7d to
187c1d0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
c69f877102] - (SEMVER-PATCH) fix(hooks): hooks double patching (Pablo Erhard) #7601e52cd32784] - (SEMVER-PATCH) [test optimization] Fix flakiness in agentless log submission tests (Juan Antonio Fernández de Alba) #760287707fdf9b] - (SEMVER-PATCH) chore(test): Fix iast esbuild flaky test (Ugaitz Urien) #7606f370fb3068] - (SEMVER-PATCH) [test optimization] Improve cypress - RUM integration (Juan Antonio Fernández de Alba) #7600c639f33b81] - (SEMVER-PATCH) fix(dsm): move dsm plugin init to start from bindStart (robcarlan-datadog) #7395d7e644c8ee] - (SEMVER-MINOR) Update libdatadog-nodejs to 0.8.1 (Attila Szegedi) #75253f3c150820] - (SEMVER-PATCH) chore(test): Fix cmd injection telemetry flaky tests (Ugaitz Urien) #75995e3de4ed38] - (SEMVER-PATCH) add integration skill (William Conti) #75687ce79440d8] - (SEMVER-PATCH) docs(debugger): correct captureTimeoutMs default to 15 (Thomas Watson) #7592120e1f5d80] - (SEMVER-PATCH) docs: remove redirect creation script (Thomas Hunter II) #75935d8737d85b] - (SEMVER-PATCH) chore: align editor config and simplify (Thomas Watson) #7551afa3606270] - (SEMVER-PATCH) chore(ci): enable workflows for merge queue (Thomas Watson) #7588c9f017ff79] - (SEMVER-MINOR) jest: wrap outer hooks too (Juan Antonio Fernández de Alba) #7587adf6379ede] - (SEMVER-PATCH) chore(test): Fix downstream request flaky test (Ugaitz Urien) #7578631fb6a7cd] - (SEMVER-MINOR) feat(dsm,dbm): add process tags support for enhanced trace correlation (Thomas Hunter II) #7212495b56a62c] - (SEMVER-PATCH) docs(cursor): clarify pr-body command instructions (Thomas Watson) #755242fbf0655f] - (SEMVER-PATCH) chore: clean up redundant co-owner entries in CODEOWNERS (Thomas Watson) #7574378da782d9] - (SEMVER-PATCH) test: enable --allow-uncaught in mocha runs (Thomas Watson) #7575ae859a9216] - (SEMVER-PATCH) add packaging reminder to eslint conf (simon-id) #7565aa8ca98897] - (SEMVER-PATCH) bump native appsec to 11.0.1 (simon-id) #7566909261eddc] - (SEMVER-PATCH) chore: add add-new-instrumentation agent skill (Thomas Watson) #75644ae024c527] - (SEMVER-PATCH) chore(cursor): add worktrees.json for worktree setup (Thomas Watson) #75635660164347] - (SEMVER-PATCH) ci: fix Datadog merge queue config filename (chore: configure Datadog merge queue #7561) (Thomas Watson)416a1d92e8] - (SEMVER-PATCH) chore: configure Datadog merge queue (Thomas Watson) #7561f75659a0fb] - (SEMVER-PATCH) chore(deps): bump the gh-actions-packages group across 2 directories with 3 updates (dependabot[bot]) #7560